home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 43 (1995-03)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2)[m bamcopy].zip / MegaDisc 43 (1995-03)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2)[m bamcopy].adf / Programming / Guide_To_AMOS_6 / structure.ASC < prev    next >
Text File  |  1994-12-21  |  974b  |  41 lines

  1. '
  2. 'A guide to AMOS 6 - Procedures and a bit more 
  3. '
  4. 'program written for the "Guide To AMOS" series by Bruce Laing 
  5. '
  6. '(C) 1994, Bruce Laing for Megadisc
  7. '
  8. Screen Open 0,640,256,2,Hires : Paper 0 : Cls : Curs Off : Hide On : Palette ,$FFF
  9. Input "Please enter a number  ";NU : Curs Off : Print 
  10. _MULTIPLY[NU]
  11. 'the above will multiply the number by 5 and store the results in param
  12. TN=Param
  13. Print "The number";NU;" Multiplied by 5 equals";TN
  14. Print : Print "Press any key" : Wait Key 
  15. Cls 
  16. _POPPIT
  17. Print : Print "Press any key" : Wait Key 
  18. Cls 
  19. Every 20 Proc _DOIT
  20. Print : Print : Print "Press control c to exit the loop"
  21. Do : Loop 
  22. Procedure _MULTIPLY[NU]
  23.    NU=NU*5
  24. End Proc[NU]
  25. Procedure _POPPIT
  26.    Cls 
  27.    Print "This will exit after a short while"
  28.    X=1
  29.    _LOP:
  30.    Print X; : X=X+1
  31.    If X=500
  32.       Print : Print "I'm outta here" : Pop Proc
  33.    End If 
  34.    Goto _LOP
  35. End Proc
  36. Procedure _DOIT
  37.    Shared X
  38.    X=X+1 : Home : Print "the value of X =";X
  39.    Every On 
  40. End Proc
  41.